using System;
using System.Data;
using System.Collections;
using APP.QUANLY.Common;

namespace RMAS.DAL
{
    /// <summary>
    /// Summary description for QT_TABLERENT.
    /// </summary>
    public class QT_TABLERENT
    {
              private Int32 _ID;
      private string _TableID;
      private string _TableName;
      private string _ExBillID;
      private DateTime _TimeStart;
      private DateTime _TimeEnd;
      private DateTime _TimeUse;
      private decimal _TableMoney;
      private decimal _ServiceMoney;
      private decimal _MoneyBeforeChange;
      private string _ChangeTable;
      private Int32 _TimeMinutePause;
      private string _UserName;
      private string _IDPOS;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
	      public bool IsSetID; 
      public bool IsIDNullable   
      { 
	 get { return false;  } 
      }
      public Int32 ID
      {
         get { return _ID; }
         set 
	    { 
 		 _ID = value;
		IsSetID = true;
 	    }
      }
    public bool IsSetTableID; 
    public bool IsTableIDNullable   
    { 
		get { return false;  } 
    }
    public string TableID
    {
        get{ return _TableID;  }
        set
		{
			_TableID = value;
			IsSetTableID = true;
		}
    }
    public bool IsSetTableName; 
    public bool IsTableNameNullable   
    { 
		get { return false;  } 
    }
    public string TableName
    {
        get{ return _TableName;  }
        set
		{
			_TableName = value;
			IsSetTableName = true;
		}
    }
    public bool IsSetExBillID; 
    public bool IsExBillIDNullable   
    { 
		get { return false;  } 
    }
    public string ExBillID
    {
        get{ return _ExBillID;  }
        set
		{
			_ExBillID = value;
			IsSetExBillID = true;
		}
    }
    public bool IsSetTimeStart; 
    public bool IsTimeStartNullable   
    { 
		get { return false;  } 
    }
    public DateTime TimeStart
    {
        get{ return _TimeStart;  }
        set
		{
			_TimeStart = value;
			IsSetTimeStart = true;
		}
    }
    public bool IsSetTimeEnd; 
    public bool IsTimeEndNullable   
    { 
		get { return false;  } 
    }
    public DateTime TimeEnd
    {
        get{ return _TimeEnd;  }
        set
		{
			_TimeEnd = value;
			IsSetTimeEnd = true;
		}
    }
    public bool IsSetTimeUse; 
    public bool IsTimeUseNullable   
    { 
		get { return false;  } 
    }
    public DateTime TimeUse
    {
        get{ return _TimeUse;  }
        set
		{
			_TimeUse = value;
			IsSetTimeUse = true;
		}
    }
    public bool IsSetTableMoney; 
    public bool IsTableMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal TableMoney
    {
        get{ return _TableMoney;  }
        set
		{
			_TableMoney = value;
			IsSetTableMoney = true;
		}
    }
    public bool IsSetServiceMoney; 
    public bool IsServiceMoneyNullable   
    { 
		get { return false;  } 
    }
    public decimal ServiceMoney
    {
        get{ return _ServiceMoney;  }
        set
		{
			_ServiceMoney = value;
			IsSetServiceMoney = true;
		}
    }
    public bool IsSetMoneyBeforeChange; 
    public bool IsMoneyBeforeChangeNullable   
    { 
		get { return false;  } 
    }
    public decimal MoneyBeforeChange
    {
        get{ return _MoneyBeforeChange;  }
        set
		{
			_MoneyBeforeChange = value;
			IsSetMoneyBeforeChange = true;
		}
    }
    public bool IsSetChangeTable; 
    public bool IsChangeTableNullable   
    { 
		get { return false;  } 
    }
    public string ChangeTable
    {
        get{ return _ChangeTable;  }
        set
		{
			_ChangeTable = value;
			IsSetChangeTable = true;
		}
    }
    public bool IsSetTimeMinutePause; 
    public bool IsTimeMinutePauseNullable   
    { 
		get { return false;  } 
    }
    public Int32 TimeMinutePause
    {
        get{ return _TimeMinutePause;  }
        set
		{
			_TimeMinutePause = value;
			IsSetTimeMinutePause = true;
		}
    }
    public bool IsSetUserName; 
    public bool IsUserNameNullable   
    { 
		get { return false;  } 
    }
    public string UserName
    {
        get{ return _UserName;  }
        set
		{
			_UserName = value;
			IsSetUserName = true;
		}
    }
    public bool IsSetIDPOS; 
    public bool IsIDPOSNullable   
    { 
		get { return false;  } 
    }
    public string IDPOS
    {
        get{ return _IDPOS;  }
        set
		{
			_IDPOS = value;
			IsSetIDPOS = true;
		}
    }

        #endregion

        #region Constructors
        public QT_TABLERENT()
        {
            Reset();
        }
        public QT_TABLERENT(QT_TABLERENT obj)
        {
            	this._ID = obj.ID;
	this._TableID = obj.TableID;
	this._TableName = obj.TableName;
	this._ExBillID = obj.ExBillID;
	this._TimeStart = obj.TimeStart;
	this._TimeEnd = obj.TimeEnd;
	this._TimeUse = obj.TimeUse;
	this._TableMoney = obj.TableMoney;
	this._ServiceMoney = obj.ServiceMoney;
	this._MoneyBeforeChange = obj.MoneyBeforeChange;
	this._ChangeTable = obj.ChangeTable;
	this._TimeMinutePause = obj.TimeMinutePause;
	this._UserName = obj.UserName;
	this._IDPOS = obj.IDPOS;
        }
        #endregion

        public void Reset()
        {
                     _ID = EmptyValues.v_Int32;
         _TableID = EmptyValues.v_string;
         _TableName = EmptyValues.v_string;
         _ExBillID = EmptyValues.v_string;
         _TimeStart = EmptyValues.v_DateTime;
         _TimeEnd = EmptyValues.v_DateTime;
         _TimeUse = EmptyValues.v_DateTime;
         _TableMoney = EmptyValues.v_decimal;
         _ServiceMoney = EmptyValues.v_decimal;
         _MoneyBeforeChange = EmptyValues.v_decimal;
         _ChangeTable = EmptyValues.v_string;
         _TimeMinutePause = EmptyValues.v_Int32;
         _UserName = EmptyValues.v_string;
         _IDPOS = EmptyValues.v_string;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["ID"] is DBNull))
		{
			obj.ID = (Int32)reader["ID"];
		}
                if(!(reader["TableID"] is DBNull))
		{
			obj.TableID = (string)reader["TableID"];
		}
                if(!(reader["TableName"] is DBNull))
		{
			obj.TableName = (string)reader["TableName"];
		}
                if(!(reader["ExBillID"] is DBNull))
		{
			obj.ExBillID = (string)reader["ExBillID"];
		}
                if(!(reader["TimeStart"] is DBNull))
		{
			obj.TimeStart = (DateTime)reader["TimeStart"];
		}
                if(!(reader["TimeEnd"] is DBNull))
		{
			obj.TimeEnd = (DateTime)reader["TimeEnd"];
		}
                if(!(reader["TimeUse"] is DBNull))
		{
			obj.TimeUse = (DateTime)reader["TimeUse"];
		}
                if(!(reader["TableMoney"] is DBNull))
		{
			obj.TableMoney = (decimal)reader["TableMoney"];
		}
                if(!(reader["ServiceMoney"] is DBNull))
		{
			obj.ServiceMoney = (decimal)reader["ServiceMoney"];
		}
                if(!(reader["MoneyBeforeChange"] is DBNull))
		{
			obj.MoneyBeforeChange = (decimal)reader["MoneyBeforeChange"];
		}
                if(!(reader["ChangeTable"] is DBNull))
		{
			obj.ChangeTable = (string)reader["ChangeTable"];
		}
                if(!(reader["TimeMinutePause"] is DBNull))
		{
			obj.TimeMinutePause = (Int32)reader["TimeMinutePause"];
		}
                if(!(reader["UserName"] is DBNull))
		{
			obj.UserName = (string)reader["UserName"];
		}
                if(!(reader["IDPOS"] is DBNull))
		{
			obj.IDPOS = (string)reader["IDPOS"];
		}
//            _ID = (reader["ID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["ID"];
//            _TableID = (reader["TableID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TableID"];
//            _TableName = (reader["TableName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TableName"];
//            _ExBillID = (reader["ExBillID"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ExBillID"];
//            _TimeStart = (reader["TimeStart"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["TimeStart"];
//            _TimeEnd = (reader["TimeEnd"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["TimeEnd"];
//            _TimeUse = (reader["TimeUse"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["TimeUse"];
//            _TableMoney = (reader["TableMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TableMoney"];
//            _ServiceMoney = (reader["ServiceMoney"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["ServiceMoney"];
//            _MoneyBeforeChange = (reader["MoneyBeforeChange"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["MoneyBeforeChange"];
//            _ChangeTable = (reader["ChangeTable"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["ChangeTable"];
//            _TimeMinutePause = (reader["TimeMinutePause"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["TimeMinutePause"];
//            _UserName = (reader["UserName"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["UserName"];
//            _IDPOS = (reader["IDPOS"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["IDPOS"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 ID, string TableID, string TableName, string ExBillID, DateTime TimeStart, DateTime TimeEnd, DateTime TimeUse, decimal TableMoney, decimal ServiceMoney, decimal MoneyBeforeChange, string ChangeTable, Int32 TimeMinutePause, string UserName, string IDPOS)
        {
                     this._ID = ID;
         this._TableID = TableID;
         this._TableName = TableName;
         this._ExBillID = ExBillID;
         this._TimeStart = TimeStart;
         this._TimeEnd = TimeEnd;
         this._TimeUse = TimeUse;
         this._TableMoney = TableMoney;
         this._ServiceMoney = ServiceMoney;
         this._MoneyBeforeChange = MoneyBeforeChange;
         this._ChangeTable = ChangeTable;
         this._TimeMinutePause = TimeMinutePause;
         this._UserName = UserName;
         this._IDPOS = IDPOS;
        }
    }
}